import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

const router= new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: ()=>import('./views/Home.vue'),
      children:[
        {name:'数据地图',path:'/data-map',component:()=>import('./views/DataMap.vue')},
        {name:'报表统计',path:'/report-form',component:()=>import('./views/ReportForm.vue')},
        {name:'大屏展示',path:'/large-screen',component:()=>import('./views/LargeScreen.vue')}
      ]
    },
    {
      path:'/login',
      component:()=>import('./views/Login.vue')
    }
  ]
})
// router.beforeEach((to,from,next)=>{

// })

export default router
